/**
 * $Id: TT.java Sep 2, 2015 4:15:34 PM hdp
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package junit;

import java.io.File;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.aurora.base.util.QiniuUtil;



/**
 * 不加载任何web容器或框架库的测试类
 */
public class TestWithNothingLoaded {

	@Test
	public void testUpdate() throws Exception  {

		File f = new File("C:\\Users\\Administrator\\Desktop\\U2\\images\\gs_pic1.jpg");
		System.out.println(f);
		if (f.exists()) {
			System.out.println(java.util.UUID.randomUUID().toString());
			QiniuUtil.upload(QiniuUtil.bucket, java.util.UUID.randomUUID().toString(), f);
			System.out.println("上传成功");
		}else{
			System.out.println("上传失败");
		}

	}

	
}
